<include file="Public/header"/>
<body>
<header>
<div class="tab_nav">
   <div class="header">
     <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"></a></div>
     <div class="h-mid">订单管理</div>
     <div class="h-right">
       <aside class="top_bar">
         <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
       </aside>
     </div>
   </div>
 </div>
</header>
<include file="Public/menu"/>

<div id="tbh5v0">
<!--------筛选 form 表单 开始-------------->
<form action="{:U('Mobile/order_list/ajax_order_list')}" name="filter_form" id="filter_form">
      <div class="Evaluation2"  >
            <ul>
              <li><a href="{:U('/Mobile/User/admin_order_list')}" class="tab_head <if condition="$_GET[type] eq ''">on</if>"  >当天订单</a></li>
              <li><a href="{:U('/Mobile/User/admin_order_list',array('type'=>'fw'))}" class="tab_head <if condition="$_GET[type] eq 'fw'">on</if>"  >服务订单</a></li>
              <!--<li><a href="{:U('/Mobile/User/admin_order_list',array('type'=>'WAITPAY'))}"      class="tab_head <if condition="$_GET[type] eq 'WAITPAY'">on</if>">待付款</a></li>-->
              <!--<li><a href="{:U('/Mobile/User/admin_order_list',array('type'=>'WAITSEND'))}"     class="tab_head <if condition="$_GET[type] eq 'WAITSEND'">on</if>">待发货</a></li>-->
              <!--<li><a href="{:U('/Mobile/User/admin_order_list',array('type'=>'WAITRECEIVE'))}"  class="tab_head <if condition="$_GET[type] eq 'WAITRECEIVE'">on</if>">待收货</a></li>-->
              <!--<li><a href="{:U('/Mobile/User/admin_order_list',array('type'=>'WAITCCOMMENT'))}" class="tab_head <if condition="$_GET[type] eq 'WAITCCOMMENT'">on</if>">已完成</a></li>-->
            </ul>
      </div>     
      
	<div class="order ajax_return">
	   <volist name="lists" id="list">
       <div class="order_list">
          <!--<h2>-->
              <!---->
                  <!--<img src="__STATIC__/images/dianpu.png" /><span>店铺名称:{$storeList[$list['store_id']]['store_name']}</span>                  -->
              <!--<a href="mqqwpa://im/chat?chat_type=wpa&uin={$storeList[$list['store_id']]['store_qq']}&version=1&src_type=web&web_src=oicqzone.com">-->
                <!--<img src="__PUBLIC__/images/qq.gif" />-->
              <!--</a>  -->
              <!--<a href="javascript:void(0);">    -->
                  <!--<strong><img src="__STATIC__/images/icojiantou1.png" /></strong>-->
              <!--</a>-->
          <!--</h2>-->
          <if condition="$type eq 'fw'">
              <a href="{:U('/Mobile/User/admin_order_detail',array('id'=>$list['order_id']))}">
              <else/>
                  <a href="javascript:;">
          </if>

	          <volist name="list.goods_list" id="good">
		          <dl>  
		          <dt><img src="{$good.goods_id|goods_thum_images=200,200}"></dt>
		          <dd class="name">


                      <strong> {$good.goods_name} </strong>

		          <span>{$good.spec_key_name} </span></dd>
		          <dd class="pice">￥{$good['member_goods_price']}元<em>x{$good['goods_num']}</em></dd>

                      <php>$g_cat_id =get_goods_cat_id($good[goods_id]);</php>
                      <dd class="pice">
                      <em>
                          <if condition="($g_cat_id eq 2) or($g_cat_id eq 3)">

                              <if condition="$good.status eq 1">
                                  <a href="javascript:;" style="color:#999;">已完成服务</a>
                                  <else/>
                                  <a href="javascript:;" style="color:#999;">待服务</a>

                              </if>
                          </if>



                      </em>
                      </dd>

				  <!--<dd class="pice">                  -->
                  	<!--<em>-->
                    	  <!--<if condition="$list.return_btn eq 1">-->
                          	<!--<a href="{:U('Mobile/User/return_goods',array('order_id'=>$list[order_id],'order_sn'=>$list[order_sn],'goods_id'=>$good[goods_id],'spec_key'=>$good['spec_key']))}" style="color:#999;">申请售后</a>-->
                          <!--</if>-->
                    <!--</em>-->
                  <!--</dd>                    -->
		          </dl>
	          </volist>
          	 </a>
          <div class="pic">共{$list.goods_list|count}件商品<span>实付：</span><strong>￥{$list['order_amount']}元</strong></div>
          <div class="anniu" style="width:95%">
                <!--<if condition="$list.cancel_btn eq 1"><span onClick="cancel_order({$list.order_id})">取消订单</span></if>-->
                <if condition="$list.pay_btn eq 1"><a href="javascript:;">待支付</a></if>
                <!--<if condition="$list.receive_btn eq 1"><a href="{:U('Mobile/User/order_confirm',array('id'=>$list['order_id']))}">收货确认</a></if>-->
                <!--<if condition="$list.comment_btn eq 1"><a href="{:U('/Mobile/User/order_detail',array('id'=>$list['order_id']))}">评价</a></if>-->
                <!--<if condition="$list.shipping_btn eq 1"><a href="http://www.kuaidi100.com/" target="_blank">查看物流</a></if>-->
                <!--<if condition="$list.return_btn eq 1"><a href="mqqwpa://im/chat?chat_type=wpa&uin={$storeList[$list['store_id']]['store_qq']}&version=1&src_type=web&web_src=oicqzone.com" target="_blank">支付完成</a></if>-->
                <if condition="$list.return_btn eq 1"><a href="javascript:;" target="_blank">支付完成</a></if>
          </div>
       </div>
		</volist>  
    </div>
  <!--查询条件-->
  <input type="hidden" name="type" value="<?php echo $_GET['type'];?>" />
</form>   
<notempty name="lists"> 
   <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
  		<a href="javascript:void(0)" onClick="ajax_sourch_submit()">点击加载更多</a>
  </div>         
</notempty>    
</div>


<script language="javascript">
var  page = 1;
 
 /*** ajax 提交表单 查询订单列表结果*/  
 function ajax_sourch_submit()
 {	 	
 		page += 1; 	 
		$.ajax({
			type : "GET",
			url:"{:U('Mobile/User/order_list',array('type'=>$_GET['type']),'')}/is_ajax/1/p/"+page,//+tab,			
			//data : $('#filter_form').serialize(),
			success: function(data)
			{
				if(data == '')
					$('#getmore').hide();
				else  
				{
					$(".ajax_return").append(data);			
					$(".m_loading").hide();
				}
			}
		}); 
 }
 
//取消订单
function cancel_order(id){
	if(!confirm("确定取消订单?"))
		return false;
	location.href = "/index.php?m=Mobile&c=User&a=cancel_order&id="+id;
}

</script>
</body>
</html>